↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PrologToPiTRSProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GGG(Pattern, Cols, Rows)
SNAKE_IN_GGG(Pattern, Cols, Rows) → U5_GGG(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GGG(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GGG(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_GAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_GAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_GGAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_GGG(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_GG(Snake, odd)
COIL_IT_IN_GG(cons(Line, Lines), odd) → U12_GG(Line, Lines, coil_it_in_gg(Lines, even))
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_GG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_GG(Line, Lines, coil_it_in_gg(Lines, odd))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PrologToPiTRSProof
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GGG(Pattern, Cols, Rows)
SNAKE_IN_GGG(Pattern, Cols, Rows) → U5_GGG(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GGG(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GGG(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_GAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_GAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_GGAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_GGG(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_GG(Snake, odd)
COIL_IT_IN_GG(cons(Line, Lines), odd) → U12_GG(Line, Lines, coil_it_in_gg(Lines, even))
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_GG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_GG(Line, Lines, coil_it_in_gg(Lines, odd))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AGA(SoFar) → REVERSE_IN_AGA(cons(SoFar))
REVERSE_IN_AGA(cons(z0)) → REVERSE_IN_AGA(cons(cons(z0)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AGA(cons(z0)) → REVERSE_IN_AGA(cons(cons(z0)))
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
U13_GG(Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
COIL_IT_IN_GG(cons(Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Lines), even) → U13_GG(Lines, reverse2_in_aa)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga(List, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(Reversed) → reverse_out_aga(nil, Reversed)
reverse_in_aga(SoFar) → U16_aga(reverse_in_aga(cons(SoFar)))
U16_aga(reverse_out_aga(Tail, Reversed)) → reverse_out_aga(cons(Tail), Reversed)
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_GAAA(cons(R)) → PART_OF_SNAKE_IN_GAAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
U9_GGAA(Rows, Cols, part_of_snake_out_gaaa(Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols)
PRODUCE_SNAKE_IN_GGAA(cons(Rows), Cols) → U9_GGAA(Rows, Cols, part_of_snake_in_gaaa(Cols))
part_of_snake_in_gaaa(nil) → part_of_snake_out_gaaa(nil)
part_of_snake_in_gaaa(cons(R)) → U11_gaaa(part_of_snake_in_gaaa(R))
U11_gaaa(part_of_snake_out_gaaa(RestRings)) → part_of_snake_out_gaaa(cons(RestRings))
part_of_snake_in_gaaa(x0)
U11_gaaa(x0)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(R)) → INFINITE_SNAKE_IN_GAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X)) → S2L_IN_GA(X)
From the DPs we obtained the following set of size-change graphs:
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GGG(Pattern, Cols, Rows)
SNAKE_IN_GGG(Pattern, Cols, Rows) → U5_GGG(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GGG(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GGG(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_GAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_GAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_GGAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_GGG(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_GG(Snake, odd)
COIL_IT_IN_GG(cons(Line, Lines), odd) → U12_GG(Line, Lines, coil_it_in_gg(Lines, even))
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_GG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_GG(Line, Lines, coil_it_in_gg(Lines, odd))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GGG(Pattern, Cols, Rows)
SNAKE_IN_GGG(Pattern, Cols, Rows) → U5_GGG(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GGG(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GGG(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
U5_GGG(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_GAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_GAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_GGAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_GGG(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
U6_GGG(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_GG(Snake, odd)
COIL_IT_IN_GG(cons(Line, Lines), odd) → U12_GG(Line, Lines, coil_it_in_gg(Lines, even))
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_GG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_GG(Line, Lines, coil_it_in_gg(Lines, odd))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AGA(Tail, cons(Head, SoFar), Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AGA(SoFar) → REVERSE_IN_AGA(cons(SoFar))
REVERSE_IN_AGA(cons(z0)) → REVERSE_IN_AGA(cons(cons(z0)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AGA(cons(z0)) → REVERSE_IN_AGA(cons(cons(z0)))
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
REVERSE_IN_AGA(cons(cons(z0))) → REVERSE_IN_AGA(cons(cons(cons(z0))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_GG(cons(Line, Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Line, Lines), even) → U13_GG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_GG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
U13_GG(Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_GG(Lines, odd)
COIL_IT_IN_GG(cons(Lines), odd) → COIL_IT_IN_GG(Lines, even)
COIL_IT_IN_GG(cons(Lines), even) → U13_GG(Lines, reverse2_in_aa)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aga(cons(SoFar)))
U16_aga(SoFar, reverse_out_aga(Tail, cons(SoFar), Reversed)) → reverse_out_aga(cons(Tail), SoFar, Reversed)
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0, x1)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_GAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_GAAA(R, Rings, RestSnake, RestRings)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_GAAA(cons(R)) → PART_OF_SNAKE_IN_GAAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
PRODUCE_SNAKE_IN_GGAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
U9_GGAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols, NewInfSnake, Tail)
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
U9_GGAA(Rows, Cols, part_of_snake_out_gaaa(Cols, Part)) → PRODUCE_SNAKE_IN_GGAA(Rows, Cols)
PRODUCE_SNAKE_IN_GGAA(cons(Rows), Cols) → U9_GGAA(Rows, Cols, part_of_snake_in_gaaa(Cols))
part_of_snake_in_gaaa(nil) → part_of_snake_out_gaaa(nil, nil)
part_of_snake_in_gaaa(cons(R)) → U11_gaaa(R, part_of_snake_in_gaaa(R))
U11_gaaa(R, part_of_snake_out_gaaa(R, RestRings)) → part_of_snake_out_gaaa(cons(R), cons(RestRings))
part_of_snake_in_gaaa(x0)
U11_gaaa(x0, x1)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(R)) → INFINITE_SNAKE_IN_GAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_ggg(Pattern, Cols, Rows))
snake_in_ggg(Pattern, Cols, Rows) → U5_ggg(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_ggg(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_ggg(Pattern, Cols, Rows, produce_snake_in_ggaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_ggaa(nil, X, X1, nil) → produce_snake_out_ggaa(nil, X, X1, nil)
produce_snake_in_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_gaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_gaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_gaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_gaaa(R, Rings, RestSnake, RestRings))
U11_gaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_gaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_gaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_ggaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_gaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_ggaa(Rows, Cols, NewInfSnake, Tail))
U10_ggaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_ggaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_ggaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_ggg(Pattern, Cols, Rows, produce_snake_out_ggaa(Rows, Cols, InfSnake, Snake)) → U7_ggg(Pattern, Cols, Rows, coil_it_in_gg(Snake, odd))
coil_it_in_gg(nil, X) → coil_it_out_gg(nil, X)
coil_it_in_gg(cons(Line, Lines), odd) → U12_gg(Line, Lines, coil_it_in_gg(Lines, even))
coil_it_in_gg(cons(Line, Lines), even) → U13_gg(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aga(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aga(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_gg(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_gg(Line, Lines, coil_it_in_gg(Lines, odd))
U14_gg(Line, Lines, coil_it_out_gg(Lines, odd)) → coil_it_out_gg(cons(Line, Lines), even)
U12_gg(Line, Lines, coil_it_out_gg(Lines, even)) → coil_it_out_gg(cons(Line, Lines), odd)
U7_ggg(Pattern, Cols, Rows, coil_it_out_gg(Snake, odd)) → snake_out_ggg(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_ggg(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
S2L_IN_GA(s(X)) → S2L_IN_GA(X)
From the DPs we obtained the following set of size-change graphs: